package com.ruoyi.video.service.impl;

import com.ruoyi.video.domain.BusDownloadInfo;
import com.ruoyi.video.mapper.DownloadInfoMapper;
import com.ruoyi.video.service.IDownloadInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DownloadServiceImpl implements IDownloadInfoService {

    @Autowired
    private DownloadInfoMapper downloadInfoMapper;

    @Override
    public BusDownloadInfo selectDownloadById(Long downId) {
        return downloadInfoMapper.selectDownloadById(downId);
    }

    @Override
    public BusDownloadInfo selectDownloadByIp(String downIp) {
        return downloadInfoMapper.selectDownloadByIp(downIp);
    }

    @Override
    public List<BusDownloadInfo> selectDownloadList() {
        return downloadInfoMapper.selectDownloadList();
    }

    @Override
    public List<BusDownloadInfo> selectDownloadListByPromCode(String promCode) {
        return downloadInfoMapper.selectDownloadListByPromCode(promCode);
    }

    @Override
    public int insertDownload(BusDownloadInfo download) {
        return downloadInfoMapper.insertDownload(download);
    }

    @Override
    public int updateDownload(BusDownloadInfo download) {
        return downloadInfoMapper.updateDownload(download);
    }
}
